Skip to content

feat: let a person remove a starter's pin by asking the worker - #47711

Closed
buluoray wants to merge 5 commits into
crew/slack/pin-onto-workersfrom
crew/slack/pin-person-unpin
Closed

buluoray wants to merge 5 commits into
crew/slack/pin-onto-workersfrom
crew/slack/pin-person-unpin

Conversation

@buluoray

@buluoray buluoray commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A person can remove a memory a starter chat pinned onto a worker by asking that worker, on a turn the person sent.

A starter chat can pin its memories onto a worker it started (#47415). The worker refuses its own unpin of such a pin (pinned_by_starter), so the worker's routine cleanup cannot drop the rules it was given. But only the starter can unpin it. Once the starter chat is closed for good, or in a fork of the worker, nobody can remove the pin except by deleting the memory record, which also removes it from every other chat.

Why it matters

A pin that nobody can remove stays in the worker's block for good and is sent first, so it pushes the worker's own pins out. RFC 11.4 (docs/request-for-change/rfc-pinned-memory.md, a maintainer ruling of 2026-12-04) has a person remove a starter's pin by asking the worker. #47415 deferred that to this PR.

Not a goal

  • A button or page control to unpin: the ruling says there is none.
  • Any change to who may unpin on a turn no person is in: the worker's routine cleanup is still refused.
  • The chat line that names the starter (RFC 11.7), the starter's prompt clause, and delivering a pin to a running worker (RFC 11.3): later PRs.

What changed (motivation → approach → change)

  • dashboard/handlers/pinned_memory.py: the worker's own unpin of a starter's pin now goes through when a person opened the worker's running turn or steered a message into it. The check is _person_in_turn from cron_lesson_autopin.py (feat: pin a lesson a person taught to the chat they taught it in #47068), the one auto-pin already uses, called from a small _person_asked(slot); no second copy. A turn with no person in it still answers pinned_by_starter.
  • mcp_tools/learn.py: the pinned_by_starter text tells the agent that only the starter can unpin it, or the agent itself on a turn the person sent asking it to.
  • docs/system-specs/modules/memory-skills-hooks.md: the sentence on the worker's own unpin says when it is allowed.

The RFC section this follows (11.4) is on main with status in-progress.

Backwards compatibility

Compatible: a turn with no person in it is refused exactly as before; a chat's own pins and the starter's unpin are unchanged.

Removes nothing: the change widens one refusal to allow a person's turn and removes no path, record or key.

Tests

test/test_pinned_memory_starter.py::TestUnpinAndList::test_a_person_s_turn_unpins_a_starters_pin: on a nudge turn the worker's unpin is refused pinned_by_starter; on a person's turn the same call unpins. Removing the _person_asked check turns it red (checked by hand). The rest of the starter tests pass unchanged.

Proof: not provable -- other: prove.py is not run in this session; the mutation was checked by hand

Manual verification

N/A — the decision is one predicate over the slot's turn rows, covered by the route test above with real classify_turn rows.

Real-machine verification

N/A -- the change is one refusal in a route that only an agent's tool call reaches; the route test drives it with real turn rows. A real-gateway run of pinned memory is scheduled for its base stack (#46364).

Part of #46328.

@buluoray
buluoray requested review from a team and KiroCrewCaptain as code owners December 5, 2026 09:18
@buluoray
buluoray requested review from iamwhatever and removed request for a team December 5, 2026 09:18
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Dec 5, 2026
@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 8a2b59917df4177ce652f52e312b06f1c78620f7 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 8a2b59917df4177ce652f52e312b06f1c78620f7 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

This adds the unpin path that RFC 11.4 rules for, and it does so by reusing the existing check rather than writing a new one.

What this change ships

Inventory (4 items) — 4 justified

Intent: let a person remove a pin a starter chat placed on a worker by asking the worker, on a turn the person sent. ADDITION.

  1. On a turn a person opened or steered into, the worker can now unpin its starter's pin. Turns with no person in them are still refused. — justified
  2. The pinned_by_starter refusal text now tells the agent that a person can ask it to unpin. — justified
  3. The spec sentence on the worker's own unpin now says when it is allowed. — justified
  4. A route test covers both the nudge-turn refusal and the person-turn unpin. — justified

[FIRST-PRINCIPLES-REVIEWED] 8a2b599

Description read

[DESCRIPTION-READ] f70fa32c0f9cfb0a7fdfcaf77b50048ac4c7c75d1d984d8f9ad9f712ca042a73

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 8a2b59917df4177ce652f52e312b06f1c78620f7 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design concerns: the change applies RFC 11.4's ruling as written. It reuses the existing _person_in_turn check and keeps refusing an unpin on any turn no person is in.

Notes

  • The check confirms that a person is in the turn, not that they asked for the unpin. On any turn a person opened, the worker can drop a starter's pin for its own reasons. The RFC accepts this, but a later reviewer should know the guard is "person present", not "person asked".

[DESIGN-REVIEWED] 8a2b599

Description read

[DESCRIPTION-READ] df91caf296c8e5ae48c76b9864dc8548d848aa83dba13e3d4da099d15a77cb0e

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 8a2b59917df4177ce652f52e312b06f1c78620f7 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 8a2b599

Verdict parsed from the review's SHA-scoped output markers for commit 8a2b59917df4177ce652f52e312b06f1c78620f7.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 8a2b59917df4177ce652f52e312b06f1c78620f7 false-positive: <reason, 20 to 500 characters>

@github-actions

github-actions Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 8a2b59917df4177ce652f52e312b06f1c78620f7 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 8a2b599

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 8a2b59917df4177ce652f52e312b06f1c78620f7 false-positive: <reason, 20 to 500 characters>

@buluoray
buluoray force-pushed the crew/slack/pin-onto-workers branch from 6c928c3 to 8c23590 Compare December 5, 2026 09:26
@buluoray
buluoray force-pushed the crew/slack/pin-person-unpin branch from 25da289 to fdba5c5 Compare December 5, 2026 09:28
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Dec 5, 2026
@buluoray
buluoray force-pushed the crew/slack/pin-person-unpin branch from fdba5c5 to 21241b0 Compare December 5, 2026 10:36
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Dec 5, 2026
@buluoray
buluoray force-pushed the crew/slack/pin-onto-workers branch from 88f8557 to 04a3c5b Compare December 5, 2026 11:17
@buluoray
buluoray force-pushed the crew/slack/pin-person-unpin branch from 21241b0 to 711d4c3 Compare December 5, 2026 11:17
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Dec 5, 2026
@buluoray
buluoray force-pushed the crew/slack/pin-onto-workers branch from 04a3c5b to 6f371f4 Compare December 5, 2026 11:59
@buluoray
buluoray force-pushed the crew/slack/pin-person-unpin branch from 711d4c3 to 0a0cabd Compare December 5, 2026 11:59
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Dec 5, 2026
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Dec 5, 2026
The pinned_memory tool takes `chat`, a session key session_create
returned. With it, list, pin and unpin act on that worker chat, when
the caller created it and both use one store. A starter's pin carries
`by`; the worker cannot unpin it, its block tags it and sends it first,
and a replaced lesson keeps the mark. Section 11 of the pinned-memory
RFC; mid-run delivery and the visible byline come later.
The catalog advertised the chat argument but the validation schema did
not name it, so every call a starter made on its worker was refused
before the route ran. Add the field, and pin every core tool's
advertised arguments to its schema so no other tool drifts the same
way.
The worker's upkeep reminder named a starter's pins among the ones left
out of a send, but the worker cannot unpin them. measure() and the
send's measurement now filter them the way the block's last line does.
The creator fence that lets a starter act on its worker's pins allowed
and refused calls with no SEL event. Each call with chat now records
one event through caller_access._audit: denied on not_your_worker,
otherwise allowed.
A pin a starter chat made on its worker could only be removed by that
starter, so once the starter chat was gone, or in a fork of the worker,
nobody could remove it. The worker may now unpin it on a turn a person
opened or steered a message into, using the auto-pin path's own
_person_in_turn check. A turn with no person in it is still refused,
so the worker's routine cleanup cannot drop the rules it was given.
@buluoray
buluoray force-pushed the crew/slack/pin-onto-workers branch from 6f371f4 to 87a4e4b Compare December 5, 2026 12:41
@buluoray
buluoray force-pushed the crew/slack/pin-person-unpin branch from 0a0cabd to 8a2b599 Compare December 5, 2026 12:42
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Dec 5, 2026
@buluoray
buluoray force-pushed the crew/slack/pin-onto-workers branch from 87a4e4b to 10bbcc4 Compare December 5, 2026 13:28
@buluoray

buluoray commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #47415 (head 10bbcc4aa9a), so the PR that adds a starter's pins also ships the way a person removes one (RFC 11.4).
Its tests, the RFC link and the not-a-goal bullets moved to #47415's body; review continues there.

@buluoray buluoray closed this Dec 5, 2026
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant